﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using LuDC.CKEditor.Services;
using Newtonsoft.Json;

namespace LuDC.CKEditor.Providers
{
	/// <summary>
	/// Config pair for the contentsCss config setting
	/// </summary>
	public class CKEditorConfigStringList : ICKEditorConfigPair
	{
		public List<string> Items { get; protected set; }

		public CKEditorConfigStringList(string key, IEnumerable<string> strings)
		{
			Key = key;
			Items = strings.ToList();
		}

		public string Key { get; set; }

		public IHtmlString Value
		{
			get { return new HtmlString(JsonConvert.SerializeObject(Items)); }
		}
	}
}
